load("//tools:defaults.bzl", "ng_package", "ng_project", "ng_web_test_suite", "ts_project")

package(default_visibility = ["//visibility:public"])

ng_project(
    name = "material-luxon-adapter",
    srcs = glob(
        ["**/*.ts"],
        exclude = ["**/*.spec.ts"],
    ),
    deps = [
        "//:node_modules/@angular/core",
        "//:node_modules/@types/luxon",
        "//:node_modules/luxon",
        "//src:dev_mode_types",
        "//src/material/core",
    ],
)

ts_project(
    name = "unit_test_sources",
    testonly = True,
    srcs = glob(
        ["**/*.spec.ts"],
        exclude = ["**/*.e2e.spec.ts"],
    ),
    deps = [
        ":material-luxon-adapter",
        "//:node_modules/@angular/core",
        "//:node_modules/@types/luxon",
        "//:node_modules/luxon",
        "//src/material/core",
    ],
)

ng_web_test_suite(
    name = "unit_tests",
    deps = [
        ":unit_test_sources",
    ],
)

ng_package(
    name = "npm_package",
    package_name = "@angular/material-luxon-adapter",
    srcs = ["package.json"],
    nested_packages = ["//src/material-luxon-adapter/schematics:npm_package"],
    tags = ["release-package"],
    visibility = [
        "//:__pkg__",
        "//goldens:__pkg__",
        "//integration:__subpackages__",
    ],
    deps = [":material-luxon-adapter"],
)
